package com.probiz.estore.system.dao;

import java.util.Date;

import com.probiz.estore.common.model.system.AppUser;
import com.probiz.estore.core.dao.GenericDao;
/**
 * Dao interface for AppUser.
 */
public interface AppUserDao<T extends AppUser> extends GenericDao<T> {
	
	public T getUserByName(String username);
    public boolean isUserExist(String username);
    public boolean isEmailExist(String email);
    /**
     * is the email use by others?
     * @param email
     * @param myAppuserId
     * @return
     */
    public boolean getIsEmailUseByOthers(String email,Integer myAppuserId);
    
    public boolean modifyPasswordByEmail(String email,String newPassword);
    
    public void modifyPasswordByAppuserId(Integer appuserId,String newPassword);
    /**
     * update app user 's status by email
     * @param email
     * @param status
     * @return
     */
    public void saveAppUserStatusByEmail(String email,Short status);
    
    public void saveLastLoginTimeByAppuserId(Integer appuserId,Date lastLoginTime);
   
}